import request from '../utils/request'
import apiPath from './bussurl'
//注册短信验证码
export function wcode (data) {
  return request({
    url: apiPath.login.code,
    method: 'post',
    data:data
  })
}
//注册
export function register (data) {
  return request({
    url: apiPath.login.register,
    method: 'post',
    data:data
  })
}
//登录
export function sogin (data) {
    return request({
      url: apiPath.login.login,
      method: 'post',
      data: data
    })
}
//权限菜单列表查询
export function menu_list (data) {
  return request({
    url: apiPath.buss.menu_list,
    method: 'get',
    params: data
  })
}
//商家角色列表查询
export function role_list (data) {
  return request({
    url: apiPath.buss.role_list,
    method: 'post',
    data: data
  })
}
//添加角色权限
export function add_role_and_menu (data) {
  return request({
    url: apiPath.buss.add_role_and_menu,
    method: 'post',
    data: data
  })
}
//修改角色菜单接口
export function update_role_menu (data) {
  return request({
    url: apiPath.buss.update_role_menu,
    method: 'post',
    data: data
  })
}
//角色删除
export function role_del (data) {
  return request({
    url: apiPath.buss.role_del,
    method: 'post',
    data: data
  })
}
//角色菜单列表查询
export function role_menu_list (data) {
  return request({
    url: apiPath.buss.role_menu_list,
    method: 'post',
    data: data
  })
}
//角色菜单列表查询
export function child_accout_list (data) {
  return request({
    url: apiPath.buss.child_accout_list,
    method: 'post',
    data: data
  })
}
//子账号禁用接口
export function child_accout_del (data) {
  return request({
    url: apiPath.buss.child_accout_del,
    method: 'post',
    data: data
  })
}



//发起活动
  export function create_activity (data) {
    return request({
      url: apiPath.buss.create_activity,
      method: 'post',
      data: data
    })
  }
  //全部活动
  export function activity_list (data) {
    return request({
      url: apiPath.buss.activity_list,
      method: 'post',
      data: data
    })
  }
  //活动详情
  export function activity_detail (data) {
    return request({
      url: apiPath.buss.activity_detail,
      method: 'post',
      data: data
    })
  }
  //子账号创建
  export function child_accout_create (data) {
    return request({
      url: apiPath.buss.child_accout_create,
      method: 'post',
      data: data
    })
  }